BIN = process.exe
SRC = $(wildcard *.c)
OBJ = $(SRC:.c=.o)
	
$(BIN):$(OBJ)
	@gcc $^ -o $@ -std=c99
	@echo "linking ... $^ to $@"

%.o:%.c
	@gcc -c  $< -o $@ -std=c99
	@echo "linking ... $^ to $@"

.PHONY:clean
clean:
	@rm -f $(BIN) $(OBJ)
	@echo "remove $(BIN) $(OBJ)..."

.PHONY:test
test:
	@echo "$(BIN)"
	@echo "$(OBJ)"
	@echo "$(SRC)"
